#include <iostream>
#include <cstdlib>

class Test{
    public: 
        Test() : numberOfTests(0), testsPassed(0){}
        ~Test(){
        }

        template< class T >
        bool valuesEqual(T expected, T actual, const char *identifier = "Generic Test"){
            numberOfTests++;
            if (expected == actual){
                testsPassed++;     
                return true;
            }

            std::cout << identifier << " failed." << std::endl;
            std::cout << "expected = " << std::endl;
            std::cout << expected  << std::endl;
            std::cout << "actual = " << std::endl;
            std::cout << actual << std::endl;
            return false;
        }
        
        template< class T >
        bool throwsException(T function){
            return false;
        }

        int results(){
            if (numberOfTests == testsPassed){
                std::cout << "SUCCESS" << std::endl;
                return EXIT_SUCCESS;
            }

            else{
                std::cout << "FAILURE" << std::endl;
                std::cout << testsPassed << " out of " << numberOfTests;
                std::cout << " total tests passed." << std::endl;
                return EXIT_FAILURE;
            }
        }

    protected:
        int numberOfTests;
        int testsPassed;

        /*So the compiler doesn't declare them for me.*/
        Test& operator=(const Test& other);
        Test(const Test& other);
};
